<template>
	<view class="content">
		<view class="header">
			<view class="ts">
				<view class="ts_add" @click="toadd()">
					<image src="../../../static/school/tj.png" mode=""></image>
					<text>新增校园套餐</text>
				</view>
			</view>
			<view class="package" v-for="(item,index) in packagelist" @click="todetails()">
				<view class="package_top">
					<view class="package_top1">
						<text>{{item.packagename}}</text>
						<image src="../../../static/school/zs1.png" mode="" @click="up(item)">
						</image>
					</view>

					<view class="update" v-show="item.status">
						<view class="c1">
							<view class="c1_up">
								<text>修改</text>
							</view>
							<view class="c1_de">
								<text>删除</text>
							</view>
							<view class="c2">

							</view>
						</view>
					</view>
				</view>

				<view class="package_bottom">
					<view class="package_bottom1" @click="share()">
						<text>分享链接</text>
					</view>
					<view class="package_bottom2">
						<text>分享二维码</text>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {


				packagelist: [{
						status: false,
						id: 0,
						packagename: '校园套餐'
					},
					{
						id: 0,
						status: false,
						packagename: '校园套餐'
					},
					{
						id: 0,
						status: false,
						packagename: '校园套餐'
					}
				]
			}
		},
		methods: {
			share() {
				uni.navigateTo({
					url: '/pages/school/myschool/characteristic_share'
				})
			},
			toadd() {
				uni.navigateTo({
					url: '/pages/school/myschool/add_package1'
				})
			},
			up(item) {
				item.status = !item.status
			},
			todetails(){
			uni.navigateTo({
				url:'/pages/school/myschool/schoolpackage_details'
			})	
			}
			

		}
	}
</script>

<style>
	.content {
		width: 750rpx;
		height: 100vh;
		background: #FAFAFA;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
	}

	.header {
		width: 750rpx;
		height: 240rpx;
		background: linear-gradient(180deg, #1789FF 0%, #93C3F9 100%);
		border-radius: 0rpx 0rpx 0rpx 0rpx;
	}

	.ts {
		padding-top: 40rpx;
	}

	.ts_add {
		width: 690rpx;
		height: 96rpx;
		background: #FFFFFF;
		border-radius: 4rpx 4rpx 4rpx 4rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		margin: auto;
	}

	.package_top1 image {
		width: 70rpx;
		height: 40rpx;
		margin-left: auto;
	}

	.ts_add image {
		height: 48rpx;
		width: 48rpx;
	}

	.ts_add text {
		font-family: PingFang SC, PingFang SC;
		font-weight: bold;
		font-size: 32rpx;
		color: #1889FF;
	}

	.package {
		width: 690rpx;
		height: 200rpx;
		background: #FFFFFF;
		border-radius: 4rpx 4rpx 4rpx 4rpx;
		margin: 32rpx auto 32rpx;
		z-index: 1;

	}


	.package_top {
		align-items: center;
		font-family: PingFang SC, PingFang SC;
		font-weight: bold;
		font-size: 32rpx;
		color: #333333;
		padding-top: 36rpx;
		margin-left: 40rpx;

	}

	.package_top1 {
		display: flex;
		align-items: center;
		width: 626rpx;

	}

	.package_bottom {
		display: flex;
		margin-top: 24rpx;
		z-index: 1;
	}

	.package_bottom1 {
		width: 176rpx;
		height: 64rpx;
		background: #409CFD;
		border-radius: 4rpx 4rpx 4rpx 4rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 28rpx;
		color: #FFFFFF;
		display: flex;
		align-items: center;
		justify-content: center;
		margin-left: 40rpx;
	}

	.package_bottom2 {
		width: 204rpx;
		height: 64rpx;
		background: #686BFF;
		border-radius: 4rpx 4rpx 4rpx 4rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 28rpx;
		color: #FFFFFF;
		display: flex;
		align-items: center;
		justify-content: center;
		margin-left: 40rpx;
	}

	.update {
		width: 170rpx;
		height: 104rpx;
		background-color: #FFFFFF;
		margin-left: auto;
		z-index: auto;
		position: absolute;
		right: 32rpx;
		margin-top: 20rpx;
	
		
	}

	.c1 {
		position: relative;
		width: 170rpx;
		height: 104rpx;
		background-color: #FFFFFF;
		padding-top: 20rpx;
		align-items: center;
		box-shadow: 0rpx 0rpx 24rpx 0rpx rgba(150, 150, 150, 0.2);
		border-radius: 2rpx 2rpx 2rpx 2rpx;
	}

	/* 实现小三角 */
	.c2 {
		/* 绝对定位 */
		position: absolute;
		/* 此处的“20”为了实现移动到小三角的盒子以外的位置调整的 */
		top: -20px;
		/* 为了实现居中 */
		right: 40rpx;
		margin-right: -10px;
		/* 实现小三角 */
		width: 0;
		height: 0;
		/* 将四个边的框都隐藏显示 */
		border: 10px solid transparent;
		/* 指定要显示的边的颜色 */
		border-bottom-color: #FFFFFF;
	}

	.c1_up {
		display: flex;
		justify-content: center;
		padding-left: 20rpx;
		padding-right: 20rpx;
		padding-bottom: 8rpx;
		border-bottom: 2rpx solid #F0F0F0;
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 28rpx;
		color: #000000;
	}

	.c1_de {
		display: flex;
		justify-content: center;
		margin-top: 8rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		font-size: 28rpx;
		color: #FF5858;
	}
</style>